<template>
  <div>
    <div id='btnsBox'>
      <button @click="revise(scope.row)" type="text" size="small" v-if="getButtonConfig&&getButtonConfig.edit">修改</button>
    </div>
    <edit-dialog :detail="detail" v-if='show' @close="closeDialog"></edit-dialog>
  </div>
</template>
<script>
import editDialog from '../components/dialog'
export default {
  props: ['scope'],
  components: {
    editDialog
  },
  data () {
    return {
      detail: '',
      show: false
    }
  },
  computed:{
    getButtonConfig () {
      return this.$store.getters.getButtonConfig('businessManagement')
    }
  },
  methods: {
    revise (row) {
      this.detail = row;
      this.show = true;
    },
    closeDialog () {
      this.show = false;
      this.$emit('reloadPage');
    }
  }
}
</script>
<style lang="less" scoped>
  #btnsBox{
        text-align: left;
        button{
            background-color: transparent;
            color:#63c5ce;
            font-size: 14px;
            padding:0 10px;
            border-right: 1px solid #63c5ce;
            border-radius:0; 
            cursor: pointer;
            &:last-child{
                border:none;
            }
            &:disabled{
                color:#bbb;
                cursor:not-allowed;
            }
        }
        .fontColorGary{
            color: #bbb;
        }
    }
</style>


